package com.MyString;

/**
 * ClassName: MyStringTest
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/8/28 16:11
 * @Version 17.0.2
 */
public class MyStringTest {
    public static void main(String[] args) {
        String str1 = "hello java";
        String str2 = "hello java";


        boolean areEqual = str1.equals(str2);

        System.out.println("str1和str2相等吗？ " + areEqual);

        String originalString = "Word";
        String replacedString = originalString.replace("Java", "Word");
        System.out.println(replacedString);
    }
}
